//
//  LessonDetailTableViewCell.m
//  ThePrivateKitchen
//
//  Created by lirui on 16/1/23.
//  Copyright © 2016年 www.lanou3g.com蓝鸥科技. All rights reserved.
//

#import "LessonDetailTableViewCell.h"
#import "Frame.h"
@implementation LessonDetailTableViewCell

- (void)dealloc
{
    [_head release];
    [_name release];
    [_content release];
    [_time release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [ super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.head = [[ UIImageView alloc] init];
        _head.backgroundColor = [ UIColor redColor];
        [self.contentView addSubview:_head];
        [_head release];
        _head.layer.cornerRadius = 50 /2;
        _head.clipsToBounds = YES;
        self.name =[[ UILabel alloc] init];
        _name.backgroundColor = [ UIColor yellowColor];
        [self.contentView addSubview:_name];
        [_name release];
        
        self.content = [[ UILabel alloc] init];
        _content.backgroundColor = [ UIColor grayColor];
        [self.contentView addSubview:_content];
        [_content release];
        self.time = [[ UILabel alloc] init];
        _time.backgroundColor = [ UIColor greenColor];
        [self.contentView addSubview:_time];
        [_time release];
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _head.frame = CGRectMake(WIDTH * 10,HEIGHT * 20, WIDTH *50 , HEIGHT*50);
    _name.frame= CGRectMake(_head.frame.origin.x + _head.frame.size.width + 10,_head.frame.origin.y ,WIDTH *200, HEIGHT*20);
    _content.frame= CGRectMake(_name.frame.origin.x, _name.frame.origin.y +_name.frame.size.height,WIDTH *200, HEIGHT *20);
    _time.frame = CGRectMake(_content.frame.origin.x, _content.frame.origin.y+_content.frame.size.height, WIDTH *200, HEIGHT *20);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
